This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating a handler which executes runnables immediately | |
Mockito.when(uiHandler.post(Mockito.any(Runnable.class))).thenAnswer( | |
new Answer<Object>() { | |
@Override | |
public Object answer(InvocationOnMock invocation) throws Throwable { | |
Runnable msg = invocation.getArgument(0); | |
msg.run(); | |
return null; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@version=2 | |
//Heikin Ashi Strategy V2 by breizh29 | |
strategy("Heikin Ashi Strategy V2",shorttitle="HAS V2",overlay=true,default_qty_value=1000,initial_capital=100000,currency=currency.EUR) | |
res = input(title="Heikin Ashi Candle Time Frame", type=resolution, defval="60") | |
hshift = input(1,title="Heikin Ashi Candle Time Frame Shift") | |
res1 = input(title="Heikin Ashi EMA Time Frame", type=resolution, defval="180") | |
mhshift = input(0,title="Heikin Ashi EMA Time Frame Shift") | |
fama = input(1,"Heikin Ashi EMA Period") | |
test = input(1,"Heikin Ashi EMA Shift") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MultiValueMap<String, Object> data = new LinkedMultiValueMap<String, Object>(); | |
ByteArrayResource resource = new ByteArrayResource(file.getBytes()) { | |
@Override | |
public String getFilename() { | |
return file.getName(); | |
} | |
}; | |
data.add("file", resource); | |
HttpHeaders requestHeaders = new HttpHeaders(); | |
requestHeaders.setContentType(MediaType.MULTIPART_FORM_DATA); |
OlderNewer